#include <iostream>
#define lld long long

using namespace std;

lld power2(int n) {
    lld ans = 1;
    for (int i = 1; i <= n; i++)
        ans *= 2;
    return ans;
}

int main() {
    lld n, k;
    lld b = 1;
    cin >> n >> k;
    lld p2n = power2(n);
    if (k == p2n - 1) {
        cout << n;
        return 0;
    }
    for (lld i = 0; i <= n; i++) {
        if (k + 1 < b) {
            cout << i - 1;
            break;
        }
        b *= 2;
    }
}